﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title>@ViewBag.Title</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="Content-Style-Type" content="text/css" />
	
    <!--
    
	<script src="@Url.Content("~/Scripts/myscript/jquery-1.9.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/myscript/jquery-ui-1.9.2.min.js")" type="text/javascript"></script>

	<link href="@Url.Content("~/Content/mycontent/style.css")" rel="stylesheet" type="text/css" />
	<link href="@Url.Content("~/Content/mycontent/box.css")" rel="stylesheet" type="text/css"/>

    <link href="@Url.Content("~/Content/mycontent/alertbar.css")" rel="stylesheet" type="text/css"/>
    -->
    <!-- css, js của nhóm -->
    
    <link href="@Url.Content("~/Content/mycontent/table_admin.css")" rel="stylesheet" type="text/css"/>

    <script src="@Url.Content("~/Scripts/jquery-1.9.0.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.9.2.min.js")" type="text/javascript"></script>

    <link href="@Url.Content("~/Content/mycontent/style.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/alert/css/style.css")" rel="stylesheet" type="text/css" />

	<link href="@Url.Content("~/Content/mycontent/box.css")" rel="stylesheet" type="text/css"/>

    <script src="@Url.Content("~/Scripts/myscript/maxheight.js")" type="text/javascript"></script>
  
    
    <link href="@Url.Content("~/Content/themes/metroblue/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/highlight.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Scripts/jtable/themes/metro/darkorange/jtable.css")" rel="stylesheet" type="text/css" />

    <link href="@Url.Content("~/Scripts/syntaxhighligher/styles/shCore.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Scripts/syntaxhighligher/styles/shThemeDefault.css")" rel="stylesheet" type="text/css" />
    
    <script src="@Url.Content("~/Scripts/modernizr-2.6.2.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/syntaxhighligher/shCore.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/syntaxhighligher/shBrushJScript.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/syntaxhighligher/shBrushXml.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/syntaxhighligher/shBrushCSharp.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/syntaxhighligher/shBrushSql.js")" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jtablesite.js")" type="text/javascript"></script>
        
    <script type="text/javascript" src="@Url.Content("~/Scripts/jtable/jquery.jtable.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/jtable/localization/jquery.jtable.vi.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/moment.min.js")"></script>

    @RenderSection("JavaScriptCSSImport", false)

    <script type="text/javascript">
             function thongBao(text){
                   $("#alert_bar").html(text);
                   $("#alert_bar").fadeIn(250);
                   setTimeout(function(){$("#alert_bar").fadeOut()},3250);
               }
            $(document).ready(function () {
                

                @RenderSection("JavaScriptDocumentReady", false)
                function XuLyQuanTam(){
                    $(".quanTamTimMua").click(function(){
                    var id =$(this).attr("accesskey");
                   var doiTuong = $(this);
                    $.ajax({
                      url: "/TimMua/QuanTam?id="+ id,
                      type: "post",
                      // PlainObject data, String textStatus, jqXHR jqXHR
                      success: function( data, textStatus, jqXHR){
                        if(data.Result == "OK"){        
                        doiTuong.hide();
                           thongBao('Quan tâm tìm mua thành công!');
                            }else if(data.Result == "ERROR")
                            {
                                thongBao('Quan tâm tìm mua thất bại. ' + data.Message);
                            }

                      },
                      // jqXHR jqXHR, String textStatus, String errorThrown
                      error:function( jqXHR, textStatus,  errorThrown){
                          thongBao('Có lỗi khi quan tâm tìm mua!');
                      }   
                    });
                });

                $(".quanTamChaoBan").click(function(){
                    var id =$(this).attr("accesskey");
                    var doiTuong = $(this);
                    
                    $.ajax({
                      url: "/ChaoBan/QuanTam?id="+ id,
                      type: "post",
                      // PlainObject data, String textStatus, jqXHR jqXHR
                      success: function( data, textStatus, jqXHR){
                            if(data.Result == "OK"){        
                            doiTuong.hide();
                           thongBao('Quan tâm chào bán thành công!');
                            }else if(data.Result == "ERROR")
                            {
                                thongBao('Quan tâm chào bán thất bại. ' + data.Message);
                            }
                      },
                      // jqXHR jqXHR, String textStatus, String errorThrown
                      error:function( jqXHR, textStatus,  errorThrown){
                           thongBao('Có lỗi khi quan tâm chào bán!');
                      }   
                    });
                });

                 $(".quanTamRaoVat").click(function(){
                   var id =$(this).attr("accesskey");
                   var doiTuong = $(this);
                    
                    $.ajax({
                      url: "/RaoVat/QuanTam?id="+ id,
                      type: "post",
                      // PlainObject data, String textStatus, jqXHR jqXHR
                      success: function( data, textStatus, jqXHR){
                        if(data.Result == "OK"){        
                            doiTuong.hide();
                           thongBao('Quan tâm rao vặt thành công!');
                            }else if(data.Result == "ERROR")
                            {
                                thongBao('Quan tâm rao vặt thất bại. ' + data.Message);
                            }

                      },
                      // jqXHR jqXHR, String textStatus, String errorThrown
                      error:function( jqXHR, textStatus,  errorThrown){
                          thongBao('Có lỗi khi quan tâm rao vặt!');
                      }   
                    });
                });
            }

            XuLyQuanTam();
            });
            
        </script>
    
</head>

<body id="page1" onload="new ElementMaxHeight();">
<div id="top-buttom_image">
    <div style="text-align:right;">
    <a href="javascript:scroll(0,0)"><img border="0" src="@Url.Content("~/Content/mycontent/images/Button-Upload-icon.png")"></a><br>
    <a href="javascript:scroll(0,430)"><img border="0" src="@Url.Content("~/Content/mycontent/images/Button-Previous-icon.png")"></a><br>
    
    <a title="Xuống cuối trang" href="javascript:scroll(0,9999999)"><img border="0" src="@Url.Content("~/Content/mycontent/images/Button-Download-icon.png")"></a>
    </div>
</div>
 <div id="alert_bar" class="jbar jbar-bottom"></div>
<!-- header -->
	<div id="header">
		<div class="bg">
			<div class="container">
				<div class="row-1">
					<div class="wrapper">
						<div class="fleft"><a href="/Home"><img src="@Url.Content("~/Content/mycontent/images/logo.jpg")" alt="" /></a></div>
						<ul class="top-links">
                         @{
                             
                             N03_11HCA_HTTTHD.Models.ThongTinDanhNhapTaiKhoan TK = null;
                             if (ViewBag.TK != null)
                             {
                                 TK = (N03_11HCA_HTTTHD.Models.ThongTinDanhNhapTaiKhoan)ViewBag.TK;
                             }
                         }

                        @if (TK == null || TK.ID1 == null)
                        {
                            <li class="first"><a href="/Home/DangNhap">Đăng nhập</a></li>
                            <li class="last"><a href="/TaiKhoan/DangKy">Đăng ký</a></li>    
                        }
                        else
                        {
                            bool isFirst = true;
                            for (int i = 0; i < TK.ListQuyen.Count; i++)
                            {
                                if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.Admin)
                                {
                                    if (isFirst)
                                    {
                                        <li class="first"><a href="/Admin">Quản lý</a></li>        
                                    }
                                    else
                                    {
                                        <li><a href="/Admin">Quản lý</a></li>       
                                    }
                                    isFirst = false;

                                }
                                if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.QuanLyKho)
                                {
                                    if (isFirst)
                                    {
                                        <li class="first"><a href="/Kho">Kho</a></li>        
                                    }
                                    else
                                    {
                                        <li><a href="/Kho">Kho</a></li>       
                                    }
                                    isFirst = false;
                                }
                            }
                            
                           <li class="last"><a href="/TaiKhoan/ThongTinCaNhan">Tài Khoản</a></li>
                            <li class="last"><a href="/Home/DangXuat">Thoát</a></li>
                        }
    
</ul>
					</div>
				</div>
				<div class="row-2">
					<!-- .nav -->
                    <ul class="nav">
                        <li><a href="/ChaoBan">Chào bán</a></li>
                        <li><a href="/TimMua">Tìm mua</a></li>
                        <li><a href="/DoanhNghiep">Doanh nghiệp</a></li>
                        <li><a href="/TinTuc">Tin tức</a></li>
                    </ul>
					<!--
                    <ul class="nav">
						<li><a href="ChaoBan">Chào bán</a></li>
						<li><a href="TimMua">Tìm mua</a></li>
						<li><a href="DoanhNghiep">Doanh nghiệp</a></li>
						<li><a href="TinTuc">Tin tức</a></li>		
					</ul>
                    -->
					<!-- /.nav -->
				</div>
				<div class="row-3">
					<img src="@Url.Content("~/Content/mycontent/images/slogan.jpg")" alt="" class="slogan" /><br />
					<p>Công nghệ kỹ thuật ngày càng phát triển, chúng tôi chỉ mong muốn mang lại cho các doanh nghiệp một nơi giao lưu, trao đổi và tìm thấy được những sản phẩm mà mình mong muốn.</p>
					<form action="" id="search-form">
						<fieldset><input type="text" class="text" value="" /><input type="submit" class="submit" value="" /></fieldset>
					</form>
				</div>
			</div>
		</div>
	</div>
<!-- content -->
	<div id="content"><div class="inner_copy"></div>
		<div class="container">
            <div>
                        <!-- menu trai -->
                        <div id="box-table-b">
                        <div class="th">Quyền quản lý</div>
 
                                 @for (int i = 0; i < TK.ListQuyen.Count; i++)
                                 {
                                     if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.AdminQuanLyTaiKhoan)
                                     {
                                        <div class="td"> <a href="/Admin/QuanLyNguoiDung">Quản lý người dùng</a></div>
                                     }
                                     if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.AdminQuanLyTimMua)
                                     {
                                          
                                        <div class="td"><a href="/Admin/QuanLyTimMua" >Quản lý tìm mua</a></div>
                                     }
                                     if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.AdminQuanLyCanBan)
                                     {
                                          
                                          <div class="td"><a href="/Admin/QuanLyCanBan"  >Quản lý cần bán</a></div>
                                     }
                                     if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.AdminQuanLyTinTuc)
                                     {
                                          
                                         <div class="td"><a href="/Admin/QuanLyTinTuc"  >Quản lý tin tức</a></div>
                                     }
                                     if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.AdminQuanLyRaoVat)
                                     {
                                          
                                         <div class="td"><a href="/Admin/QuanLyRaoVat"  >Quản lý rao vặt</a></div>
                                     }
                                     if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.AdminQuanLyThongDiep)
                                     {
 
                                          <div class="td"><a href="/Admin/QuanLyThongDiep"  >Quản lý thông điệp</a></div>
                                     }
                                     if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.AdminQuanLyDanhMuc)
                                     {
                                          
                                         <div class="td"><a href="/Admin/QuanLyDanhMuc"  >Quản lý danh mục</a></div>
                                     }
                                     if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.AdminQuanLyLinhVuc)
                                     {
                                          
                                        <td><a href="/Admin/QuanLyLinhVuc" >Quản lý lĩnh vực</a></td>
                                     }
                                     if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.AdminQuanLyLoaiTaiKhoan)
                                     {
                                          
                                         <div class="td"><a href="/Admin/QuanLyLinhVuc" >Quản lý loại tài khoản</a></div>
                                     }
                                     if (TK.ListQuyen[i] == (int)N03_11HCA_HTTTHD.TienIch.QuyenTruyCap.AdminPhanQuyen)
                                     {
                                          
                                         <div class="td"><a href="/Admin/QuanLyPhanQuyen"  >Phân quyền</a></div>
                                     }
                                 }
                                 <div class="clear_both"></div>
                    </div>
					    <!-- menu trai -->
            </div>
            <div>
            @RenderSection("TimKiemImport", false)
            </div>
            <div>
                @RenderBody()
            </div>

			<div class="wrapper">
				<div class="aside maxheight">
					<div class="indent">
                        
						
					</div>
				</div>
				<div class="mainContent maxheight">
					<div class="indent">
					</div>
				</div>
			</div>
		</div>
	</div>
<!-- footer -->
	<div id="footer">
		<div class="bg">
			<div class="container">
				<div class="indent">
					Copyright - Nhóm 3 lá + 2 - 11HCA<br />
					2013-2014
					 <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a></p>
				</div>	
			</div>
		</div>
	</div>
</body>
</html>